module TodoHelper
  
  def in_expiration
    return in_expiration = Assistance.count(:all, 
                           :conditions => ['expiration > ? AND expiration < ? AND ticket_state != ?', 
                           Time.now, Time.now + 24.hours, 2] )
  end
  
  def urgent_today
    return urgent_today = Assistance.count(:all, 
                          :conditions => ['expiration > ? AND expiration < ? AND urgency = ? AND ticket_state != ?', 
                          Time.now, Time.now + 24.hours, true, 2] )
  end
end